let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
let recalc = function () {
    let width = document.documentElement.clientWidth;
    if (width < 1920) {
        width = 1920;
    }
    let point = 1 / 1920;
    let FontSize = point * width;
    document.documentElement.style.fontSize = FontSize + 'px';
    window.REMFontSize = FontSize;
}
recalc();
window.addEventListener(resizeEvt, recalc, false);
document.addEventListener('DOMContentLoaded', recalc, false);